<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'memberLoginForm.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script>
	function formCheck(){
		if( loginform.id.value.length == 0 ){
			alert('ID를 입력해 주세요.');
			loginform.id.focus();
			return false;
		}
		if( loginform.password.value.length == 0 ){
			alert('비밀번호를 입력해 주세요.');
			loginform.password.focus();
			return false;
		}
	}
	</script>
	<jsp:include page="../index.jsp"></jsp:include>
  </head>
  
  <body>
    <h4>[ 로그인 ]</h4>
    <font color="red"><b>${fieldErrors.loginmsg}</b></font>
    <form name="loginform" action="<s:url value="/member/memberLogin.action"/>" method="post" onsubmit="return formCheck();">
    <table>
    <tbody>
    <tr>
    	<td align="center" style="width: 100; background-color: efefef;">ID</td>
    	<td><input name="member.id" id="id" style="width: 150"/></td>
    </tr>
    <tr>
    	<td align="center" style="width: 100; background-color: efefef;">비밀번호</td>
    	<td><input type="password" name="member.password" id="password" style="width: 150"/></td>
    </tr>
    <tr>
    	<td align="center" colspan="2">
    	<input type="submit" value="로그인" style="width: 70"/>
    	</td>
    </tr>
    </tbody>
    </table>
    </form>
  </body>
</html>
